﻿/*
 * FeatureMetadata
 * 
 * initial implementation : 20.9.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
//using System.Collections.Generic;
using Petra.Gis.Geometry.Support;
//using Petra.Gis.ReferenceSystemServices;
//using System.Xml.Serialization;


namespace Petra.Gis.DataServices.Metadata
{


  /// <summary>
  /// Feature spatial metadata
  /// </summary>
  public class FeatureMetadata
  {


    public FeatureMetadata()
    {
      //_geometryFieldMetadata = new SpatialFieldMetadata[];
    }


    private string _catalog;

    /// <summary>
    /// get/set Feature set catalog. Catalog is available for large scale data sources (typicaly RDBMS),
    /// where features are organized in catalogs, schemas and tables.
    /// </summary>
    public string Catalog
    {
      get { return _catalog; }
      set
      {
        if (value == null || value == "")
          throw new ArgumentException("null catalog not allowed");

        _catalog = value;
      }
    }





    private string _schema;

    /// <summary>
    /// get/set Feature set schema. Schema is available for large scale data sources (typicaly RDBMS),
    /// where features are organized in catalogs, schemas and tables.
    /// </summary>
    public string Schema
    {
      get { return _schema; }
      set
      {
        if (value == null || value == "")
          throw new ArgumentException("null schema not allowed");

        _schema = value;
      }
    }





    private string _name;

    /// <summary>
    /// get/set Feature set name
    /// </summary>
    public string Name
    {
      get { return _name; }
      set
      {
        if (value == null || value == "")
          throw new ArgumentException("null name not allowed");

        _name = value;
      }
    }





    private string _alias = "";

    /// <summary>
    /// get/set Feature set Alias
    /// </summary>
    public string Alias
    {
      get { return _alias; }
      set
      {
        if (value == null || value == "")
          throw new ArgumentException("null alias not allowed");

        _alias = value;
      }
    }




    //protected string _title;

    /// <summary>
    /// get/set Feature set title (usualy same as name)
    /// </summary>
    public string Title
    { get; set; }





    //protected string _abstract;

    /// <summary>
    /// get/set abstract text that describes Feature set more detailed.
    /// </summary>
    public string Abstract
    { get; set; }




    //protected string _authority;

    /// <summary>
    /// get/set Authority information as text for Feature set
    /// </summary>
    public string Authority
    { get; set; }





    //protected BoundingBox _bounds;

    /// <summary>
    /// Spatial extent/bounding box for Feature set.
    /// This is optional as majority of data sources don't care of data bounding box
    /// </summary>
    public BoundingBox Bounds
    { get; set; }





    //protected SpatialFieldMetadata[] _geometryFieldMetadata;

    /// <summary>
    /// Collection of spatial field metadata.
    /// Single feature can have multiple geometry fields (columns).
    /// Each field must have its own metadata
    /// </summary>
    public SpatialFieldMetadata[] GeometryFieldsMetadata
    { get; set; }





    //protected string[] _keyWords;


    /// <summary>
    /// get/set Feature set keywords (optional)
    /// </summary>
    public string[] KeyWords
    { get; set; }





    //protected ContactInfo _contactInfo;

    /// <summary>
    /// get/set Feature set contact info
    /// </summary>
    public ContactInfo ContactInfo
    { get; set; }



  }

}
